<template>
	<view class="bjs" style="position:relative">
		<view style="position: absolute;top: 280rpx;left: 330rpx;z-index: 5;">
			<image v-if="!myVideotemp" @click="mybfq()" style="width: 50px;height: 50px;" src="https://mp-7c5f2fa7-1d2c-41f1-b3dd-1f45e490fd36.cdn.bspapp.com/2024/08/19/32947321-88258116-0.png"></image>
		</view>
		<view v-if="myVideotemp" style="position: absolute;top: 20rpx;width: 100%;z-index: 5;">
			<video id="myVideo" ref="myVideo" style="width: 100%;" :src="vk.getVuex('$wxsystm.wxsystmInfo.index.indexsp') || info.indexsp" 
			@pause="myztbf()" :poster="vk.getVuex('$wxsystm.wxsystmInfo.index.indexspfm') || info.indexspfm" enable-danmu controls></video>
		</view>
		<view style="width: 100%;height: 1090rpx;">
			<image style="width: 100%;height: 1100rpx;" src="https://mp-7c5f2fa7-1d2c-41f1-b3dd-1f45e490fd36.cdn.bspapp.com/2024/08/14/22253031-17337745-2475d67dbd6da561355b3e37ee0b72f.png"></image>
			<view class="grid col-5" style="height: 17vh;width: 90%; margin: auto;position: relative;top: -280rpx;background-color: white;border-radius: 10px;">
				<view class="" style="position: relative;top: 25rpx;" v-for="(item, index) in gridlist" :index="index" :key="index" @click="link(item)">
					<view class="radius text-center">
						<view class="text-lg"><image class="imageIon" webp="true" :src="item.url"  mode="scaleToFill" /></view>
						<view class="margin-top-sm text-Abc" style="font-weight: bold;">{{ item.text }}</view>
					</view>
				</view>
			</view>
		</view>
		<!-- <button @click="sxsjcj">花名册</button> -->
		<!-- <button @click="sxsjcj">学生登记</button><button @click="sxsjcj">花名册</button>
		<button @click="togogg">辅导员登记</button> <button @click="sphGet()">视频号</button>-->
		<view style="width: 100%;padding: 16rpx;">
			<image @click="zxbm" style="width: 100%;height: 200px;" :src="vk.getVuex('$wxsystm.wxsystmInfo.index.zxbm') || info.zsbm"></image>
		</view>
		<view class="cu-bar solid-bottom" style="width: 100%;background-color: #f9f3c1;">
			<view class="action" 
			style="color: rgb(14, 107, 54);
			font-family: cursive;
			font-weight: bold;
			font-size: xx-large;">
				<text class="cuIcon-title"></text>学院信息
			</view>
		</view>

		<view class="padding" style="width: 100%;background-color: #f9f3c1;">
			<view style="
			height: 700rpx;
			background-color: #fefcef;
			box-shadow:0px -1px 1px rgba(0, 0, 0, 0.1),1px 0px 1px rgba(0, 0, 0, 0.1),0px 1px 1px rgba(0, 0, 0, 0.1),-1px 0px 1px rgba(0, 0, 0, 0.1);
			 border-radius: 0px 5px 0px 0px;">
				<view class="text-left zthj">官网地址：www.hngsxy.com</view>
				<view class="text-left zthj">联系地址：湖南省衡阳市石鼓区松木经济开发区</view>
				<view class="text-left zthj">邮政编码：421001</view>
				<view class="text-left zthj">咨询电话:0734-8593338 8593358</view>
				<view style="height: 90px;width: 90%;background-color: white;margin: auto;
					border-radius: 5px;font-size: larger;line-height: 30px;align-items: center;justify-items: center;text-align: center;
				">
					<view style="top: 35rpx;position: relative;">客服在线时间周一至周五 08:00-17:30（节假日除外）</view>
				</view>
<!-- 				<view class="text-left zthj">关于客服的在线时间是周一到周五(工作日),节假日除外.</view>
				<view class="text-left zthj">工作日在线时间是早上8:00至下午17:30</view> -->
			</view>
		</view>
		
		<button open-type="contact" class="lianxi bbtt" style="border: none;">
		  <image :src="vk.getVuex('$wxsystm.wxsystmInfo.index.indexkf') || info.indexkf" class="backimg"></image>
		</button>
	</view>
</template>


<script>
	var vk = uni.vk;
	var _this;
	//import uniEditor from '@/pages_bd/uni-editor/editor.vue';
	// import UniNoticeBar from '@/pages_bd/components/uni-notice-bar/uni-notice-bar';
	export default {
		components: {},
		data() {
			// 页面数据变量
			return {
				myVideotemp:false,
				videoContext:null,
				info:{
					zsbm:'http://www.hngsxy.com/projectresources/lstp/77T9O.png',
					indexkf:'https://mp-7c5f2fa7-1d2c-41f1-b3dd-1f45e490fd36.cdn.bspapp.com/2024/01/08/02867797-64545741-0.png',
					indexsp:'http://www.hngsxy.com/projectresources/media/hngsxy20230703.mp4',
					indexspfm:'https://mp-7c5f2fa7-1d2c-41f1-b3dd-1f45e490fd36.cdn.bspapp.com/cloudstorage/49f54864-82e7-49c7-b2ab-43004912c547.png',
				},
				options:{},
				posterImg:'',
				gridlist: [{
						url: 'http://www.hngsxy.com/projectresources/wxapp/indexImg/zhaosheng.png',
						text: '招生就业',
						badge: '0',
						type: "primary"
					},
					{
						url: 'http://www.hngsxy.com/projectresources/wxapp/indexImg/xinw.png',
						text: '学院新闻',
						badge: '1',
						type: "primary"
					},
					{
						url: 'http://www.hngsxy.com/projectresources/wxapp/infoQueryImg/zhuanye.png',
						text: '专业介绍',
						badge: '3',
						type: "primary"
					},
					{
						url: 'http://www.hngsxy.com/projectresources/wxapp/indexImg/xygk.png',
						text: '学校概况',
						badge: '4',
						type: "primary"
					},
					{
						url: 'http://www.hngsxy.com/projectresources/wxapp/indexImg/bumen.png',
						text: '综合部门',
						badge: '5',
						type: "primary"
					}
				],
				cardCur: 0,
				swiperList: [{
					id: 0,
					type: 'image',
					url: 'http://www.hngsxy.com/r3/imgs/xyzyImg/zytp_lbt_2.jpg'
				}, {
					id: 1,
					type: 'image',
					url: 'http://www.hngsxy.com/r3/imgs/xyzyImg/zytp_lbt_1.jpg',
				}, {
					id: 2,
					type: 'image',
					url: 'http://www.hngsxy.com/r3/imgs/xyzyImg/zytp_lbt_3.jpg'
				}],
				dotStyle: false,
				towerStart: 0,
				direction: ''
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onTabItemTap(item) {
			//this.dyxx()
		},
		// 监听 - 页面每次【加载时】执行(如：前进)
		async onLoad(options = {}) {
			vk = uni.vk;
			_this = this;
			this.options = options;
			
			
			// console.log('小程序吗',this.options)
			// vk.alert(this.options);
			this.info = getApp().globalData.index
			//await this.dyxx()
			//await this.getinfo()
		},
		// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快，会在页面进入动画完成前触发
		async onReady() {
			//播放器
			_this.videoContext = uni.createVideoContext('myVideo');
			//await this.tzgga();
		},
		// 监听 - 页面每次【显示时】执行(如：前进和返回) (页面每次出现在屏幕上都触发，包括从下级页面点返回露出当前页面)
		onShow() {

		},
		// 监听 - 页面每次【隐藏时】执行(如：返回)
		onHide() {

		},
		// 监听 - 点击右上角转发时
		onShareAppMessage(options) {

		},
		// 函数
		methods: {
			myztbf(){
				this.myVideotemp = false
			},
			mybfq(){
				//
				
				this.myVideotemp = true
				_this.videoContext = uni.createVideoContext('myVideo');
				_this.videoContext.play();
			},
		  sphGet(){
			vk.navigateTo('/pages_bd/jmtp/jptp-list');
			//vk.navigateTo('/pages_bd/dept/gsxyh5');
			// wx.openChannelsActivity({
			//   finderUserName: 'sphKeLSgk3bYOwE',
			//   feedId: 'export/UzFfAgtgekIEAQAAAAAA-5A4GvYhFAAAAAstQy6ubaLX4KHWvLEZgBPE5INcW08EY86FzNPgMJqmnQ6QZRMqVDhWCYBRgZVh',
			//   success (res) {
			// 	console.log(res)
			//   }
			// })
		  },
			dyxx(){	
				return uni.requestSubscribeMessage({
				  tmplIds: ['21CX0MkjAUc8VMZgi9xlxEiVDLlNZ-Z4KJ_Nfu9ScqA'],
				  success (res) {
					  //console.log(res) 学院通知
				  },fail(fail){}
				})
			},
			sxsjcj(){
				
				uni.requestSubscribeMessage({
				  tmplIds: ['b-hRKqswmA87LYw8-kkWdW-9GqMvYXSb35kik2pD2RQ'],
				  success (res) {
					  console.log(res)
				  },fail(fail){}
				})
				
				//wx.openUrl({url: 'https://www.hngsxy.com/pages/anon/xueyuan/wldchaxun.html'})
				
				//vk.navigateTo('/pages_modules/bdsj/ceshibjs');
				
				//vk.navigateTo('/pages_bd/gsxgj/xueshenglvqutongzhi');
				//vk.navigateTo('/pages_modules/bdsj/jzyghmc');
				//vk.navigateTo('/pages_modules/jwc/xswxzc?scene=658bc70f55b337b6b20209a2');
			},
			togogg(){
				vk.navigateTo('/pages_modules/jwc/fdylogin');
			},
			link(item){
			if(item.text == '招生就业'){
					vk.navigateTo('/pages_bd/dept/enrollment_employment');
				}else if(item.text == '学院新闻'){
					vk.navigateTo({
						url: '/pages_bd/video_notice_new/gir_new?newsType=0,DZBGS4&name=学院新闻'
					});
				}else if(item.text == '专业介绍'){
					vk.navigateTo({
						url: '/pages_bd/video_notice_new/gir_new_zy'
					});
				}else if(item.text == '学校概况'){
					vk.navigateTo({
						url: '/pages_bd/dept/school_profile'
					});
				}else if(item.text == '综合部门'){
					vk.navigateTo({
						url: '/pages_bd/dept/comprehensive_department'
					});
				}
			},
			gocanvas(){
				//vk.navigateTo('/pages_bd/froms/canvas')
				vk.setStorageSync('wxgzh-key', 'https://mp.weixin.qq.com/s?__biz=MzAwMjk2MDc0OA==&mid=2247500411&idx=1&sn=245cb75e72b8ad3ec195ba30aa89775a&chksm=9ac0fe78adb7776e42ee93f3b92611bcba65d8fb82d92d305ee97bdf398992162d3cf0b3f587&token=1933361918&lang=zh_CN#rd');
				vk.navigateTo('/pages_bd/gsxgj/web-view?data=1');
			},
			zxbm(){
				vk.navigateTo('/pages_bd/froms/zsbd');
			},
			DotStyle(e) {
				this.dotStyle = e.detail.value
			},
			// cardSwiper
			cardSwiper(e) {
				this.cardCur = e.detail.current
			}
		},
		// 监听器
		watch: {

		},
		// 计算属性
		computed: {

		}
	}
</script>
<style lang="scss" scoped>
	

	.grid-center {  
	  display: grid;  
	  place-items: center; /* 简写，同时设置justify-items和align-items为center */  
	  height: 100px; /* 或其他高度 */  
	}  
	
	.zthj{
		line-height: 2.0; 
		padding: 5px;
		font-size: large;
	}
	.bjs{
		width: 100%;
		background-color: #f9f3c1;
	}
	.sybj{
		  background-image: url('https://mp-7c5f2fa7-1d2c-41f1-b3dd-1f45e490fd36.cdn.bspapp.com/2024/08/14/22253031-17337745-2475d67dbd6da561355b3e37ee0b72f.png');  
		  background-size: contain; /* 图片完全显示在容器内，但可能无法覆盖整个容器 */  
		  background-position: top; /* 图片居中显示 */  
		  background-repeat: no-repeat; /* 防止图片重复 */  
		  height: 1200rpx;
	}
	
	
	.bbtt::after {
	  border: none;
	}
	.lianxi{
		border: none;
		background-color: transparent;
		height: 100rpx;
		right:0rpx;
		bottom: 350rpx;
		position: fixed;
	}
	.backimg{
	 z-index: 1;
	 width: 100rpx;
	 height: 100rpx;
	}
	.tower-swiper .tower-item {
		transform: scale(calc(0.5 + var(--index) / 10));
		margin-left: calc(var(--left) * 100upx - 150upx);
		z-index: var(--index);
	}
	// .example-body {
	// 	/* padding: 30upx; */
	// 	background: #fff
	// }
	// .vvv{
	// 	font-size: 14px;
	// 	line-height: 3.0;
	// }
	.imageIon {
		width: 95upx;
		height: 95upx;
	}
	.text {
		font-size: 26upx;
		margin-top: 10upx;
	}
</style>